<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>splice方法</h2>
</body>
<script>
    const arr=['vue','React','Angular','Uniapp']
    //插入
   // let res=arr.splice(1,0,'微信小程序')
   //替换
  // let res=arr.splice(1,2,'微信小程序')
   //删除
   let res=arr.splice(1,2)
    console.log(res)
    console.log(arr)
</script>
</html>